Finding Maximal 2-Dimensional Palindromes

نویسندگان

  • Sara Geizhals
  • Dina Sokol
چکیده

This paper extends the problem of palindrome searching into a higher dimension, addressing two definitions of 2D palindromes. The first definition implies a square, while the second definition (also known as a centrosymmetric factor), can be any rectangular shape. We describe two algorithms for searching a 2D text for maximal palindromes, one for each type of 2D palindrome. The first algorithm is optimal; it runs in linear time, on par with Manacher’s linear time 1D palindrome algorithm. The second algorithm searches a text of size n1 × n2 (n1 ≥ n2) in O(n2) time for each of its n1 × n2 positions. Since each position may have up to O(n2) maximal palindromes centered at that location, the second result is also optimal in terms of the worst-case output size. 1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Improved Upper Bounds on all Maximal $\alpha$-gapped Repeats and Palindromes

We show that the number of all maximal α-gapped repeats and palindromes of a word of length n is at most 3(π/6 + 5/2)αn and 7(π/6 + 1/2)αn − 5n− 1, respectively.

متن کامل

Finding Palindromes: Variants and Algorithms

The problem of finding palindromes in strings appears in many variants: find exact palindromes, ignore punctuation in palindromes, require space around palindromes, etc. This paper introduces several predicates that represent variants of the problem of finding palindromes in strings. It also introduces properties for palindrome predicates, and shows which predicates satisfy which properties. Th...

متن کامل

Finding approximate palindromes in strings

We introduce a novel de nition of approximate palindromes in strings, and provide an algorithm to nd all maximal approximate palindromes in a string with up to k errors. Our de nition is based on the usual edit operations of approximate pattern matching, and the algorithm we give, for a string of size n on a xed alphabet, runs in O(kn) time. We also discuss two implementationrelated improvement...

متن کامل

The history of finding palindromes

This paper describes the history of finding palindromes in computer science. The problem of determining whether or not a string is a palindrome is one of the oldest computer science problems, and algorithms for this problem have been constructed since the early years of computer science. This paper describes the contributions to solving algorithmic problems related to finding palindromes and va...

متن کامل

Counting and Verifying Maximal Palindromes

A palindrome is a symmetric string that reads the same forward and backward. Let Pals(w) denote the set of maximal palindromes of a string w in which each palindrome is represented by a pair (c, r), where c is the center and r is the radius of the palindrome. We say that two strings w and z are pal-distinct if Pals(w) 6= Pals(z). Firstly, we describe the number of pal-distinct strings, and show...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016